package http;

import javax.servlet.annotation.WebServlet;
import java.io.IOException;

@WebServlet("/to_page")
public class RedirectSrevlet  extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        String page = request.getParameter("page");
        String url = request.getRequestURI();
        System.out.println(url);
        response.sendRedirect("/" + page + ".html");
    }
}
